# 作用：字符串
# 作者：霜white
# 时间：2016-12-26 and 27

# 创建字典
d = {'key1': 'value1', 'key2': 'value2'}

# 一个简单的实例
dict1 = {'Alece': '2341', 'Beth': '9102', 'Cecil': '3258'}

dict2 = {'abc': 456}
dict3 = {'abc': 123, 98.6: 37}

# 创建字典
dict01 = {'abc': 456}
dict02 = {'abc': 123, 98.6: 37}

# 访问字典里的值
dict03 = {'Name': 'shuiq iang', 'Age': 28, 'Class': 'First'}
print("dict03['Name']: ", dict03['Name'])
print("dict03['Age']: ", dict03['Age'])

dict03['Age'] = 29  # 更新Age
dict03['Schllo'] = "Xinyu"  # 添加信息
print(dict03)


# 删除字典元素
del dict03['Name']  # 删除键‘Name’
dict03.clear()  # 删除字典
del dict03  # 删除字典
print(dict03)



